#include "GY_PhoneNumberEdit.h"
#include<QValidator>
GY_PhoneNumberEdit::GY_PhoneNumberEdit(QWidget *parent) :
    QLineEdit(parent)
{

    setPlaceholderText(QString::fromLocal8Bit("input PhoneNumber"));
    setValidator(new QRegExpValidator(QRegExp("[0-9]+$")));   //只能输入数字
    setMaxLength(11);  // 设置手机号位数的限制
}

GY_PhoneNumberEdit::~GY_PhoneNumberEdit()
{

}
//*****************************************//
//函数功能:获取手机号**************************//
//传参:无**********************************//
//返回值:手机号******************************//
//***************************************//
QString GY_PhoneNumberEdit::getPhoneNumber()
{
    return text();
}
